home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / trubasic / rolldemos / CMDLIST next >
Text File  |  1994-08-02  |  10KB  |  275 lines

  1.         Command List for UNIX version of True BASIC
  2.         -------------------------------------------
  3.  
  4. Updated for version 1.5:
  5.  
  6. abs(n)                    absolute value of n
  7. acos(n)                    cosine of n
  8. call add_postscript(s$)            add the string s$ to PostScript otuput
  9. angle(x,y)                angle at point x,y
  10. asin(n)                    arcsin of n      
  11. ask #n: ACCESS a$            ask file access (read/write)
  12. ask background c            ask background color index
  13. ask color c                ask foreground color index
  14. ask color mix (c) r,g,b            ask rgb color mix for color c
  15. ask cursor v,h                ask current cursor position
  16. ask #1: DATUM a$            ask type of next item in file (num,str)
  17. ask directory a$            ask current directory
  18. ask #1: ERASABLE b$            ask if file is erasable
  19. ask #1: FILESIZE n            ask file size in bytes
  20. ask #1: FILETYPE s$            ask file type (text, record, byte)
  21. ask free memory n            ask free memory in bytes
  22. ask margin n                ask margin
  23. ask max color c                ask maximum color index
  24. ask max cursor v,h            ask maximum cursor position
  25. ask mode s$                ask mode (graphics, text, rgb...)
  26. ask #1: NAME s$                ask file name
  27. ask #1: ORGANIZATION s$            ask organization (text, record, byte)
  28. ask pixels px,py            ask number of pixels in window
  29. ask #1: POINTER a$            ask file pointer (begin,middle,end)
  30. ask #1: RECORD n            ask record number
  31. ask #1: RECSIZE n            ask record size
  32. ask #1: RECTYPE s$            ask record type
  33. ask screen x1,x2,y1,y2            ask screen coordinates
  34. ask #1: SETTER s$            ask setter
  35. ask text justify i$,j$            ask text justification (left,center)
  36. ask window x1,x2,y1,y2            ask window transformation
  37. ask zonewidth n                ask zonewidth (tabs)
  38. ask #1: ZONEWIDTH n            ask zonewidth for file
  39. atn(n)                    arctangent of n
  40. call backbuffer(1)            turn on (1) or off (0) back buffer
  41. begin_postscript(fname$,picax1,picax2,picay1,picay2)
  42.                     send PS output to fname$ on pica window
  43. box area x1,x2,y1,y2            box area with current color
  44. box circle x1,x2,y1,y2            draw circle
  45. box clear x1,x2,y1,y2            clear area
  46. box ellipse x1,x2,y1,y2            draw ellipse
  47. box keep x1,x2,y1,y2 in a$        keep area in image string
  48. box lines x1,x2,y1,y2            draw lines
  49. box show s$ at x,y            show image at point x,y
  50. break                    break program execution
  51. case "n"                case for case select
  52. cause error n, s$            cause error number n with message s$
  53. ceil(n)                    round n up
  54. chain "!cc -o pgm pgm.c -lc",return    chain to shell or other program
  55. chr$(k)                    convert ascii code to char
  56. clear                    clear current window
  57. close #1                close channel 
  58. set mode "cmap"                enter colormap mode (vs RGB)
  59. con a                    mat array a=1
  60. continue                continue after error
  61. cos(n)                    cosine of n
  62. cosh(n)                    hyperbolic cosine of n
  63. cot(n)                    cotangent
  64. cpos(a$,b$,n)                first occurrence of b$ in a$ from pos n
  65. cposr(a$,b$,n)                first b$ in a$ backwards from pos n
  66. csc(n)                    cosecant
  67. data 1                    data statment
  68. date$                    date function
  69. date                    date (numeric format)
  70. debug on                turn debugging on
  71. declare def f$                declare a function
  72. declare function f$            declare a function
  73. declare numeric                declare a numeric variable
  74. declare public a            declare a public variable
  75. declare string s$            declare a string variable
  76. declare sub sname            declare a subroutine
  77. deg                    degrees
  78. det                    determinant of a matrix
  79. call diagnostics(1)            turn on (1) or off (0) diagnsotic msgs
  80. dim a(1,1)                dimension an array
  81. divide                    divide function
  82. do                    do loop
  83. dot(a,b)                dot product of two arrays
  84. set mode "doublebuffer"            turn on double buffering
  85. draw polygon                 draw a picture
  86. sub drawmode(m$)            set the logical drawmode
  87. set mode "dynamic"            use read-write colors (vs shared)
  88. else                    if-then-else-end if
  89. elseif                    if-then-elseif-end if
  90. end                    end of program
  91. end def                    end of function
  92. end function                end of function
  93. end handler                end of handler
  94. end if                    end of if
  95. end module                end of module
  96. end picture                end of picture
  97. call end_ postscript(n)            end PostScript output
  98. end select                end select
  99. end sub                    end subroutine
  100. end when                end when
  101. eps n                    epsilon of n
  102. erase                    erase a file
  103. exit                    exit
  104. exit def                exit function
  105. exit do                    exit do loop
  106. exit for                exit for next
  107. exit function                exit function
  108. exit handler                exit error handler
  109. exit picture                exit picture
  110. exit sub                exit subroutine
  111. exline$                    error line number
  112. exline                    error line string
  113. exp                    exponent of number
  114. external                external variable
  115. extext$                    error text
  116. extype                    error type
  117. flood x,y                flood contiguous region
  118. call fill_circle(x1,x2,y1,y2)        draw filled circle
  119. for                    for next
  120. fp(n)                    fractional part of n
  121. call frontbuffer(1)            turn front buffer on (1) or off (0)
  122. get key k                block for key
  123. get mouse x,y,state            get mouse position and state
  124. get point x,y                get mouse click
  125. sub get_mouse(button$,x,y,state)    get position and state of mouse
  126. gosub sname                gosub
  127. goto n                    goto
  128. call gshade(pts,clrs)            Gourard shading function
  129. idn                    identity of matrix
  130. if                    if then
  131. image                    image string for print using
  132. input n                    input
  133. inputfocus(n)                mouse focus in window (1) or out (0)
  134. int(n)                    integer
  135. inv a                    invert matrix
  136. ip                    greatest unsigned integer
  137. lbound(n)                lower bound
  138. lcase$(n$)                lower case
  139. len(n$)                    length
  140. library "module.tru"            include
  141. line input n$                input a line
  142. local n                    local variable
  143. lock #1: n                lock a record or range of bytes
  144. log n                    log
  145. log10 n                    log base 10
  146. log2 n                    log base 2
  147. loop                    do loop
  148. ltrim$(n$)                trim at beginning
  149. mat a                    read in a matrix
  150. mat input a                input a matrix
  151. mat line input a$            input a matrix of lines
  152. mat plot a                plot a matrix
  153. mat print a$                print a matrix
  154. mat read a                 read a matrix
  155. mat redim a                redimension a matrix
  156. max(a,b)                max
  157. mat write a                write a matrix
  158. maxlen(s$)                maximum length
  159. maxnum                    largest number
  160. maxsize(a$)                maximum size
  161. min(a,b)                minimum
  162. mod(o,d)                modulus
  163. module foo                module
  164. ncpos(a$,b$,n)                first b$ char not in a$ from pos n
  165. ncposr(a$,b$,n)                first b$ char not in a$ back from pos n
  166. next i                    for next
  167. nul$(a)                    zero arrray 
  168. num$(a)                    IEEE 8 byte format
  169. num(a$)                    return number
  170. on gosub                gosub 
  171. open #1: name "foo"            open file channel
  172. open #1: screen x1,x2,y1,y2        open screen channel
  173. option angle                angle (vs degrees)
  174. ord(n$)                    ordinal position in ASCII set
  175. option arithmetic            option arithmetic (vs decimal)
  176. option base                option base
  177. option collate                option collate
  178. option nolet                make let statement optional
  179. option typo                flag mismatched variable names
  180. packb(a$,bstart,blen,value)        pack value into a$ for byte positions
  181. pause secs                pause
  182. pi                    pi (3.14159...)
  183. picture foo                picture
  184. call pipe(op$,f$,nb,io$,fn)        pipe i/o
  185. play sound$                play sound
  186. plot x,y                plot point
  187. plot area x1,x2,y1,y2            plot area
  188. plot line x1,x2,y1,y2            plot lines
  189. plot points ar                plot points
  190. plot text, at x,y: s$            plot text
  191. call popup(menu$)            popup menu
  192. pos(a$,b$,n)                first b$ in a$ from char n
  193. posr(a$,b$,n)                first b$ in a$ backwards from char n
  194. print "hello world"            print
  195. private varname                private variable
  196. program pname with (parm$)        program with parameter
  197. public varname                public variable
  198. rad(x)                    number of radians in x degrees
  199. randomize                randomize seed
  200. read n                    read data
  201. rem comment                comment (also !)
  202. remainder                remainder
  203. call readcpixel(px,py,r,g,b)        read RGB values for pixel
  204. n=readpixel(px,py)            return colormap index for pixel
  205. n=readsource(1)                readsource back buffer (0), front (1)
  206. b=refresh(1)                true when refresh event has occurred
  207. repeat$(s$,n)                repeat s$ n times
  208. reset #1                reset channel pointer
  209. restore                    restore data
  210. retry                    retry error
  211. return                    return
  212. set mode "rgb"                set mode RGB (vs cmap)
  213. rnd                    random number 0 to 1
  214. round(n,p)                round n to p places
  215. rtrim$(s$)                trim rear
  216. run pgm.tru                run program
  217. sec(n)                    secant
  218. select case s$                select case
  219. set #1: begin                set channel to beginning
  220. call setfont(f$)            set font to family name f$
  221. call setfontsize(n)            set font size
  222. call setfontstyle(s$)            set font style (weight,slant)
  223. set background clr            set background color
  224. set color clr                set foreground color
  225. set color mix (clr) r,g,b        set RGB color mix
  226. set cursor y,x                set cursor position
  227. set directory s$            set directory
  228. set margin n                set margin
  229. set mode "graphics"            set graphics mode, open window
  230. set name #1: "foo"            set name for file
  231. set pointer #1: end            set channel pointer to end
  232. set record #1: n            set current record
  233. set recsize #1: n            set record size
  234. set text justify i$,j$            set text justification
  235. set window x1,x2,y1,y2            set window transformation
  236. set zonewidth n                set zonewidth
  237. sgn(n)                    sign of n
  238. share var                shared variable
  239. sin(n)                    sine
  240. sinh(n)                    hyperbolic sine
  241. size(a)                    size of array a
  242. sound f,d                sound note with frequency and duration
  243. sqr(n)                    square root
  244. stop                    stop program
  245. str$(n)                    convert number to string
  246. sub foo                    subroutine
  247. call swapbuffers(1)            swap fornt and back buffers
  248. tab(n)                    tab n spaces
  249. tan(n)                    tangent
  250. tanh(n)                    hyperbolic tangent
  251. time$                    time string
  252. time                    time numeric format
  253. trace on                turn trace mode on
  254. trim$(s$)                trim front and back
  255. trn(n)                    transpose 2d numeric array
  256. tru pgm.tru -o pgm            produce executable from basic pgm
  257. truncate(s$)                truncate string
  258. ubound(a$,i)                upperbound of dimension i
  259. ucase$(s$)                convert to uppercase
  260. unlock #1: n                unlock a record or range of bytes
  261. unpackb(s$,1,8)                unpack bytes from string
  262. use                    use error handler
  263. using$                    print using format string
  264. val(s$)                    return numerical value
  265. when                    when error in
  266. sub winfo(m$,v$)            get/set window attributes
  267. window #1                switch to a window
  268. write #1: n                write to a byte file
  269. call tw_wset_current(wid,x1,x2,y1,y2)    set window position (0-1)
  270. call tw_wset_minmax(wid,x1,x2,y1,y2)    set minmax for window (0-1)
  271. call tw_wset_size(px,py)        set window size in pixels
  272. call tw_wset_title(wid,t$)        set window title
  273. zer(a)                    zero out array
  274. zonewidth n                set zonewidth
  275.